﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using Bymed.SpineScan.Service.Shared;
using Bymed.SpineScan.WPF.ViewModel.TestItemViewModel;

namespace Bymed.SpineScan.WPF.Converter
{
    public class CustomizedTestItemTitleConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            var inputValue = value as SingleTestItemViewModel;

            if (inputValue != null && GeneralUtility.IsPositiveInteger(inputValue.TestItemName))
            {
                return inputValue.TestItemTitle;
            }
            else
            {
                return string.Empty;
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
